﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Century.EnterpriseLibrary.Caching
{
    public interface ICacheService
    {
        void Add(string cacheKey, object data);

        void Add(string cacheKey, object data, TimeSpan expiration);

        void Remove(string cacheKey);

        object Get(string cacheKey);

        object Get(string cacheKey, Func<object> getData);

        object Get(string cacheKey, Func<object> getData, TimeSpan expiration);

        T Get<T>(string cacheKey, Func<T> getData) where T : class;

        T Get<T>(string cacheKey, Func<T> getData, TimeSpan expiration) where T : class;
    }
}
